package com.qf.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.qf.entity.Order;
import com.qf.entity.OrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface OrderMapper extends BaseMapper<Order> {
    void addOrder(@Param("order") Order order, @Param("tabIndex") Integer tableIndex);

    Order getOrderById(@Param("oid") String oid, @Param("tabIndex") Integer tabIndex);

    void batchInsertOrderDetail(@Param("odList") List<OrderDetail> orderDetails, @Param("tabIndex") Integer tableIndex);

    void updateOrderStatus(@Param("oid") String oid, @Param("status") Integer status, @Param("tabIndex") Integer tabIndex);

    List<Order> getUserOrderList(@Param("uid") Integer uid, @Param("tabIndex") Integer tabIndex);
}
